	var popBox=new PopWindow();
	$("#addbk").click(function(){
		var url_type = $(this).attr("url");
		//console.log(url_type);
		if(url_type=="1"){
			//var url_u = "http://www.12301.cc/applycard.html?act=addcard&bankaccount="+$(this).attr("bankname")+"";
			var url_u = "applycard.html?act=addcard&bankaccount="+$(this).attr("bankname")+"";
		}
		else{
			//var url_u = "/new/d/applycard.html?act=addcard&bankaccount="+$(this).attr("bankname")+"" ;
			var url_u = "applycard.html?act=addcard&bankaccount="+$(this).attr("bankname")+"" ;
		}
		popBox.open("<iframe id='if' frameborder='no'  scrolling='no' border='0' width='600'  height='300' src="+url_u+"></iframe>");
		return false;
	})
	$(".card_config").click(function(){
		var url_set = $(this).attr("url_set");
		if(url_set=="1"){
			//var url_ul = "http://www.12301.cc/applycard.html?act=updatecard&bankaccount="+$(this).attr("bankname")+"";
			var url_ul = "applycard.html?act=updatecard&bankaccount="+$(this).attr("bankname")+"";
		}
		else{
			//var url_ul = "/new/d/applycard.html?act=updatecard&bankaccount="+$(this).attr("bankname")+"" ;
			var url_ul = "applycard.html?act=updatecard&bankaccount="+$(this).attr("bankname")+"" ;
		}
		var num=$(this).attr("num");
		popBox.open("<iframe id='if' frameborder='no'  scrolling='no' border='0' width='600'  height='300' src="+url_ul+"></iframe>");
		return false;
	}) 
	$(".bank_r").on("click",".click_li",function(e){
		var target = $(e.currentTarget); 
		var id = target.attr("data-id");
		//alert(id)
		$(this).toggleClass("border");
		$("#account").val(id);
	})
$(function(){
    $(".click_li").each(function(e){
        $(this).click(function(e){
			var target = $(e.currentTarget);
			var id = target.attr("data-id");
            $("li").addClass("").removeClass("checked");
            $(this).addClass("checked").removeClass("");
        })
    });
})
	$(".delete").click(function(){
		var url_ull = $(this).attr("url_ul");
		if(url_ull=="1"){
			//var url_uu = "http://www.12301.cc/call/handle.php?from=withdraw_dele&bankaccount="+$(this).attr("bankname")+"";
			var url_uu = "call/handle.php?from=withdraw_dele&bankaccount="+$(this).attr("bankname")+"";
		}
		else{
			//var url_uu = "/new/d/call/handle.php?from=withdraw_dele&bankaccount="+$(this).attr("bankname")+"" ;
			var url_uu = "call/handle.php?from=withdraw_dele&bankaccount="+$(this).attr("bankname")+"" ;
		}
		if(confirm("确定要删除该银行卡?")){
			$.ajax({
				"url":url_uu,
				"dataType":"json",
				"success":function(data){
					if(data.outcome==1){
						alert("删除成功");
						window.location=window.location.href;
					}else{
						alert("删除失败");
					}
				}
			})
		}
		 return false;
	}) 
    var fee_bank=$('#shouxu').attr("value");
	$("#money").keyup(function(){
			var money=$("#money").val();
			if($("#money").val()<200){
				$("#shouxu").text("0（提现金额的"+fee_bank+"%）");
				$(".notice_title").show();
				$("#shiji").text("0 元");
				$("#s").val("0");
				//var text="转账金额不能小于200元";
				//alert(text);
				event.preventDefault();
				return false;
			}
			$(".notice_title").hide();
			var mon = ((money*fee_bank/100).toFixed(2)<1)?0:(money*fee_bank/100).toFixed(2);
			$("#shouxu").text(mon+"  元  （提现金额的"+fee_bank+"%）");
			var mark = $('input:radio:checked').val();
			type_acc();
			});
function type_acc(){
			var mark;
			var money=$("#money").val();
			var mon = ((money*fee_bank/100).toFixed(2)<1)?1:(money*fee_bank/100).toFixed(2);
			var mo=(money-mon).toFixed(2);
			if(mark==1){
					$("#shiji").text(+money+"  元");
					$("#account_money").val(money);
					$("#account_type").val("1");
				}
			else{
				$("#shiji").text(+mo+"  元");
				$("#account_money").val(mo);
				$("#account_type").val("0");

			}
            $("#de_money").val(mon);
}
	$(".card").click(function(){
		var mark = $(this).val();
		var money=$("#money").val();
			var mon = ((money*fee_bank/100).toFixed(2)<1)?1:(money*fee_bank/100).toFixed(2);
			var mo=(money-mon).toFixed(2);
			if(mark==1){
					$("#shiji").text(+money+"  元");
					$("#account_money").val(money);
					$("#account_type").val("1");
					$("#de_money").val(mon);
				}
			else{
				$("#shiji").text(+mo+"  元");
				$("#account_money").val(mo);
				$("#account_type").val("0");
				$("#de_money").val("");
			}
	})
	$("#nextbut").click(function(event){
		var type = $(this).attr("data-type");
		if($("#account").val()===""){
			var text="请选择提现账户";
			alert(text);
			event.preventDefault();
			return false;
		}
		if($("#money").val()<200){
			var text="转账金额不能小于200元";
			alert(text);
			event.preventDefault();
			return false;
		}
		if($("#checkMobile").val()==1){
			popBox.open();
		}
		if(type=="1"){
			//var url = "http://www.12301.cc/call/handle.php" ;
			var url = "call/handle.php" ;
		}
		else{
			//var url = "/new/d/call/handle.php" ;
			var url = "call/handle.php" ;
		}
		var applyform=$("#applyform").serialize(); 
		$.post(url,applyform,function(data){
		//$.post('http://www.12301.cc/admin/pppp.php',applyform,function(data){
				if(data.outcome==1){
						alert("申请成功");
						window.location=window.location.href;
					}else{
						alert("申请失败"+data.msg);
					}
			},'json');
		return false;
	})
	
